#pragma once
#include "Complex.h"

class JuliaNervus;

class JuliaNervusSignalLink
{
public:	
	JuliaNervusSignalLink(): m_bActive(false),m_pToNervus(NULL),m_nExpire(0)
	{};

	bool m_bActive;
	JuliaNervus *m_pToNervus;
	Complex m_cValue;
	int m_nExpire;
};

class JuliaNervus
{
public:
	JuliaNervus(void);
	~JuliaNervus(void);

	void InitSignal(int,Complex);
	void SetOutSignalParam( int nIdx, JuliaNervus* pTo, int exp );
	void SetInSignalParam( int nIdx, int exp );

	void SetInputSignal( int nIdx, Complex input );
	bool ProcessSignal( void );
	void TransmitSignal( void );

	Complex GetOutputSignalValue( void );

private:
	JuliaNervusSignalLink *m_sInputSignalArray;
	JuliaNervusSignalLink *m_sOutputSignalArray;
	int m_nSignalCount;

	Complex m_cValue;
	Complex m_cDefValue;
};

